package edu.liushao.entity;

import java.io.Serializable;

/**
 * @program: untitled
 * @ClassName Student
 * @description:  演示 bean的生命周期
 * @author: 刘庆东
 * @create: 2024−11-27 15:40
 * @Version 1.0
 **/

public class Student  implements Serializable {

    public Student() {
        System.out.println("第一步：执行无参数的构造方法....");
    }

    private String names;

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
        System.out.println("第二步：调用ｓｅｔ方法给属性赋值　");
    }

    public  void initMethod(){
        System.out.println("第三步：调用初始化。。。。　");
    }

    public  void destroyMethod(){
        System.out.println("第五步：调用销毁的方法....　");
    }
}
